1. Field of the Invention
The present invention relates to a method and apparatus for detecting a moving body, and more particularly, to a method and apparatus for detecting persons passing through passages or entrances and exits of buildings by processing image signals obtained from a video camera.
2. Prior Art
FIG. 17 illustrates a moving body counting apparatus equipped with a conventional moving body detection apparatus that uses a video camera.
The video camera 11 is installed in a ceiling, etc., over a passage or entrance/exit of a building so that the camera looks down on a monitoring region through which moving bodies such as persons 20 passing through the passage or entrance/exit pass.
Images picked up by the video camera 11 are digitized by an A/D converter 12, and these digitized images are successively updated in a current image memory 13 at short time intervals, so that the most recent image is stored in the current image memory 13.
In addition, the output of the current image memory 13 is stored in an immediately-prior image memory 14, and this immediately-prior image memory 14 sends an image which is one frame prior to the image arriving from the current image memory 13 to a movement judging part 15.
The movement judging part 15 judges the presence or absence of a moving body by processing the current image stored in the current image memory 13 and the output of the immediately-prior image memory 14 which constitutes an image one frame prior to the current image; and moving body detection signals outputted by this movement judging part 15 are counted by a counting means 16, and the count value of this counting means 16 is outputted by an output device 17.
The method used to judge the presence or absence of a moving body in the above conventional moving body counting apparatus will be described in greater detail below.
FIG. 18 shows the image obtained by imaging a passing person. The reference numeral 92 refers to a current image stored in the current image memory 13, and 91 indicates the image one frame prior to the current image 92, i. e., the immediately-prior image stored in the immediately-prior image memory 14. In both of these images, a stationary image 82 is shown in the vicinity of the image 81 of the passing person in order to facilitate discrimination of the amount of movement of the image 81. The reference numeral 93 is the output of the movement judging part 15; and this output is an image (hereafter referred to as a "differential image") which is produced by taking the differences in brightness between the respective picture elements of the current image 92 and the immediately-prior image 91. In other words, the output is an image which has a differential region 94 (the area indicated by shading) in which the brightness varies between the current image 92 and the immediately-prior image 91. Furthermore, in order to simplify the description, a region in which there is no overlapping of images 81 of passing persons in the current image 92 and immediately-prior image 91 is shown as the differential region 94 in FIG. 18. In cases where the area of the differential region 94 (portion indicated by shading) in the differential image 93 exceeds a prescribed threshold value, a passing person 20 is judged to be present by the movement judging part 15. Thus, in the system illustrated in FIG. 18, the aggregate of the video camera 11, A/D converter 12, current image memory 13, immediately-prior image memory 14 and movement judging means 15 functions as a moving body detection apparatus. Next, when a differential region 94 having an area exceeding the threshold value crosses a counting line 95 set within the monitoring region 96, the counting means 16 performs a counting operation, and the result of this counting operation is outputted by the output device 17.
However, in the above conventional apparatus, the presence or absence of a passing person 20 is detected on the basis of a differential image 93 obtained by taking differences in brightness between the current image 92 and immediately-prior image 91. Accordingly, if there are changes in the intensity of illumination in the area being imaged by the video camera 11 or the sensitivity caused by the automatic exposure adjustment function of the video camera 11 changes, then regions where there is a change in brightness may be generated within the monitoring region 96 in spite of the fact that no image 81 of a passing person is present, and a detection signal indicative of a passing person 20 may be erroneously outputted. Accordingly, in such cases, the counting result outputted by the counting means 16 does not match actual conditions.
Furthermore, in the apparatus described above, two image memories are required, i. e., a current image memory 13 and an immediately-prior image memory 14, which respectively store the current image and an image one frame prior to the current image. Accordingly, it is disadvantageous in terms of cost.
Moreover, in cases where a plurality of moving bodies 20 pass by each other in close proximity, it is difficult to separate and discriminate the respective passing persons 20 as individuals at the instant at which these persons pass by each other; this also lowers the precision of the count.
In the prior art described above, the objectives of detection are passing persons 20. However, it goes without saying that similar problems arise in cases where moving bodies such as automobiles traveling along a road, etc. are detected.